import React from 'react'
import classnames from 'classnames/bind'
import styles from './NoData.scss'
import image from './image/noda1.png'
import PropTypes from 'prop-types'

let cx = classnames.bind(styles)

export default class NoData extends React.Component {
    static propTypes = {
        tip: PropTypes.string,
    }
    static defaultProps = {
        tip: '没有数据'
    }

    render() {
        const {tip} = this.props
        let classes = cx(this.props.className, {
            ['no-data']: true
        })

        return (
            <div className={classes}>
                <img src={image} alt=""/>
                <span>{this.props.tip}</span>
            </div>
        )
    }
}

